package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.Shop;
import cn.wolfcode.crm.service.IShopService;
import cn.wolfcode.crm.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by ALIENWARE on 2018/7/8.
 */
@Controller
@RequestMapping("shop")
public class ShopController {

    @Autowired
    private IShopService shopService;


    @RequestMapping("listAll")
    @ResponseBody
    public PageResult listAll(){
        return new PageResult(0,shopService.selectAll());

    }
    @RequestMapping("listAllShop")
    @ResponseBody
    public List<Shop> listAllShop() {

        return  shopService.listAllShop();
    }

}
